package controller.commands;

import controller.BidirectionalHashMap;
import model.graphic.GraphicModel;
import view.GUI.graphic.GraphicView;

/**
 *
 * @author Ben
 */
public class ContainerCommand extends BasicCommand{
    private BasicCommand arg;

    public ContainerCommand(BasicCommand arg, GraphicModel gmodel){
        this(arg,new GraphicView(null,null),gmodel);
    }

    public ContainerCommand(BasicCommand arg, GraphicView gview, GraphicModel gmodel) {
        this.arg = arg;
        this.gview=gview;
        this.gmodel = gmodel;
    }

    @Override
    public void execute() {
        arg.setGview(gview);
        arg.setCModel(cmodel);
        arg.setGModel(gmodel);
        arg.setSync(BidirectionalHashMap.getInstance());
        arg.setController(controller);
        arg.execute();
    }


    @Override
    public void setGview(GraphicView gview) {
    }

    @Override
    public void setGModel(GraphicModel gmodel) {
    }

}
